jmp start
message db '1+2+3+....+50'
start:
    mov ax,0x7c00
    mov ds,ax
    mov ax,0xb800
    mov es,ax
    mov si,message
    mov di,0
    mov cx,start - message
showmsg:
    mov al,[si]
    mov [es:di],al
    inc di
    mov byte [es:di],0x70
    inc di
    inc si
    loop showmsg

    xor ax,ax
    mov cx,1
summate:
    add ax,cx
    inc cx
    cmp cx,51
    jl summate

    xor cx,cx
    mov ss,cx
    mov sp,cx
    mov bx,10
    xor cx,cx

decompo:
    inc cx
    xor dx,dx
    div bx
    add dl,0x30
    push dx
    cmp ax,0
    jne decompo

shownum:
    pop dx
    mov [es:di],dl
    inc di
    mov byte [es:di],0x70
    inc di
    loop shownum

    jmp $
    times 510-($-$$) db 0
    db 0x55,0xaa